<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>${htmlTitleText}-重置密码</title>
<%@ include file="../../commons/commons_resource_head.jsp"%>
<style>
.pf-row {
	margin-bottom: 5px;
}

.pf-row  label {
	display: inline-block;
	width: 20%;
	text-align: right;
}
</style>
</head>
<body>
	<div class="container-fluid" style="padding-top: 100px;">

		<div style="width: 500px; margin: 0 auto;">
			<c:if test="${ msgFirstLogin !=null}">
				<label class="block clearfix alert alert-danger" style="padding: 7px; width: 100%">${msgFirstLogin }</label>
			</c:if>
			<c:choose>
				<c:when test="${ param.msg!=null}">
					<label class="block clearfix alert alert-danger" style="padding: 7px; width: 100%">${param.msg }</label>
				</c:when>
				<c:when test="${ msg !=null}">
					<label class="block clearfix alert alert-danger" style="padding: 7px; width: 100%">${msg }</label>
				</c:when>
			</c:choose>



			<form action="/manage/system/password/reset/post" method="post" onsubmit="return valid()">
				<div class="pf-row">
					<label>
						<span class="red">*</span>
						原密码:
					</label>
					<input type="password" class="form-control" style="display: inline-block; width: 75%" placeholder="旧密码" name="password" />
				</div>
				<div class="pf-row">
					<label>
						<span class="red">*</span>
						新密码:
					</label>
					<input type="password" class="form-control" style="display: inline-block; width: 75%" placeholder="新密码" name="newPassword" />
				</div>
				<div class="pf-row">
					<label>
						<span class="red">*</span>
						重复新密码:
					</label>
					<input type="password" class="form-control" style="display: inline-block; width: 75%" placeholder="重复新密码" name="newPassword1" />
				</div>
				<div style="text-align: center">
					<button type="submit" class="btn btn-primary pf-submit">提交</button>
				</div>
			</form>
		</div>
	</div>
	<%@ include file="../../commons/commons_resource_foot.jsp"%>
	<script type="text/javascript">
		function valid() {
			var newPwdVal = $("input[name='newPassword']").val();
			var newPwd1Val = $("input[name='newPassword1']").val();
			if ($("input[name='password']").val() == "") {
				layer.errorMsg("旧密码不能为空");
			} else if (newPwdVal == "") {
				layer.errorMsg("新密码不能为空");
			} else if (newPwd1Val == "") {
				layer.errorMsg("重复新密码不能为空");
			} else if (newPwdVal != newPwd1Val) {
				layer.errorMsg("两次新密码不一致 ");
			} else {
				return true;
			}
			return false;
		}
	</script>
</body>
</html>